SetExpirePasswordImmediate Method

Syntax

Context.Security.SetExpirePasswordImmediate as V (UserName as C, Expire as L)

Arguments

UserNameCharacter

The name of a user.

ExpireLogical

Use .T. to set the user's password as expired. Use .F. to set the user's password as no longer expired. (See note below.)

Description

Sets or clears a user's password as expired or not.

Discussion

Context.Security.SetExpirePasswordImmediate() sets or clears a user's password as expired or not. Check Context.Security.CallResult.Success to check whether the method was successful or not. After this method is called with Expire set to .T. a call to PasswordHasExpired() with the same user name will return .T. whether or not the password expiration timespan has elapsed or not.

Context.Security.SetExpirePasswordImmediate() does not affect the last changed timestamp of the user's password. Calling this method with Expire .T. and then calling it again with .F. will not reset the password's last changed timestamp. Only an actual password change will update the password's last changed timestamp.